package net.cathackers.devel.scmp.chat.interfaces;

import java.util.LinkedList;
import net.cathackers.devel.scmp.auth.interfaces.UserID;
import net.cathackers.devel.scmp.chat.exceptions.RosterItemAlreadyExistsException;
import net.cathackers.devel.scmp.chat.exceptions.RosterItemNotFoundException;
import net.cathackers.devel.scmp.chat.impl.xmpp.iqcomponent.roster.RosterItem;
import net.cathackers.devel.scmp.chat.interfaces.RosterSubscriptionManager.Ask;
import net.cathackers.devel.scmp.chat.interfaces.RosterSubscriptionManager.Subscription;
import net.cathackers.devel.scmp.exceptions.BackendException;

public interface RosterBackend {
    
    
    public LinkedList<RosterItem> getRoster(UserID ownerID) throws RosterItemNotFoundException, BackendException;
    public UserID[] getSubscribers(UserID user) throws RosterItemNotFoundException, BackendException;
    public UserID[] getPublishers(UserID user) throws BackendException, RosterItemNotFoundException;
    public RosterItem getRosterItem(UserID ownerID, UserID itemID)throws RosterItemNotFoundException, BackendException;
    public void addRosterItem(UserID userName, RosterItem item)throws BackendException, RosterItemAlreadyExistsException;
    public void removeRosterItem(UserID ownerID, UserID itemID)throws BackendException;
    public void updateNickname(UserID ownerID, UserID itemID, String nickname) throws RosterItemNotFoundException, BackendException;
    public void updateGroup(UserID ownerID, UserID itemID, String group) throws RosterItemNotFoundException, BackendException;
    public void updateAsk(UserID ownerID, UserID itemID, Ask askType) throws BackendException, RosterItemNotFoundException;
    public void updateSubscription(UserID ownerID, UserID itemID, Subscription sub) throws BackendException, RosterItemNotFoundException;
}
